#ifndef ORDERSMANAGEMENT_H
#define ORDERSMANAGEMENT_H

#include "ordersform.h"
#include "itemform.h"
#include <QWidget>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QMessageBox>
#include <QDebug>
#include <QSqlError>
#include <QInputDialog>
#include <QListWidgetItem>
#include <QListWidget>
#include <QDateTime>
#include <QComboBox>
#include <QDateTimeEdit>
#include <QTextEdit>
#include <QKeyEvent>

namespace Ui {
class ordersManagement;
}

class ordersManagement : public QWidget
{
    Q_OBJECT

public:
    explicit ordersManagement(QWidget *parent = nullptr);
    ~ordersManagement();

private slots:
    void on_ordersList_itemClicked(QListWidgetItem *item);

    void on_saveBtn_clicked();

    void on_searchBtn_clicked();

    void on_deleteBtn_clicked();

private:
    Ui::ordersManagement *ui;
    QSqlDatabase db;
    QListWidget* dishesList;
    QLabel* dishesTitle;
    bool changed;
    void initList();
    void clearEdit();
    void editTrue();
    void editFalse();
};

#endif // ORDERSMANAGEMENT_H
